package radiostation;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 *
 * @author profanis
 */
public class RadioStation {
    
    public static void setWindowsLookAndFeel() {

        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (Exception ex) {
            System.err.println("Could not set Windows Look And Feel");
            System.exit(1);
        }

    }
    
     public static void main(String[] args) {

        setWindowsLookAndFeel();
        
        // initialize entityManagerFactory
        EntityManagerFactory emf = Persistence.createEntityManagerFactory("radiostationPU");
        EntityManager em = emf.createEntityManager();
        
        MainUI mainUI = new MainUI(em);
        mainUI.setVisible(true);
        
    }
}
